package com.szxy.frontend.portal.feign;

import com.szxy.pojo.TbItem;
import com.szxy.pojo.TbItemDesc;
import com.szxy.pojo.TbItemParamItem;
import com.szxy.utils.CatResult;
import com.szxy.utils.ContentAD;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Auther:zwer
 * @Date:2019/9/11 11:35
 * @Description:com.szxy.frontend.portal.feign
 * @Version:1.0
 **/
@FeignClient("common-redis")
public interface CommonRedisFeiginClient {

    //-------------/service/redis
    @RequestMapping("/service/redis/insertItemCatResult")
    void insertItemCatResult(@RequestBody CatResult result);

    @RequestMapping("/service/redis/getItemCatResult")
    CatResult getItemCatResult();

    @RequestMapping("/service/redis/insertContentAD")
    void insertContentAD(@RequestBody List<ContentAD> contentADList);

    @RequestMapping("/service/redis/getContentAD")
    List<ContentAD> getContentAD();

    //---------------/service/redis/item
    @RequestMapping("/service/redis/item/insertItemInfo")
    public void insertItemInfo(@RequestBody TbItem item);

    @RequestMapping("/service/redis/item/getItemInfo")
    public TbItem getItemInfo(@RequestParam("itemId") Long itemId);

    @RequestMapping("/service/redis/item/insertItemDesc")
    public void insertItemDesc(@RequestBody TbItemDesc itemDesc);

    @RequestMapping("/service/redis/item/getItemDesc")
    public TbItemDesc getItemDesc(@RequestParam("itemId")  Long itemId);

    @RequestMapping("/service/redis/item/insertItemParamItem")
    public void insertItemParamItem(@RequestBody TbItemParamItem itemParamItem);

    @RequestMapping("/service/redis/item/getItemParamItem")
    public TbItemParamItem getItemParamItem(@RequestParam("itemId") Long itemId);

}
